package com.lagou.advice;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component("myAdvice")  //相当于配置了bean标签  id属性
@Aspect
public class MyAdvice {

    @Pointcut("execution(* com.lagou.service.Impl.CourseContentServiceImpl.*(..))")
    public void myPoint(){}

    @Before("MyAdvice.myPoint()")
    public void before() {
        System.out.println("前置增强...");
    }

}
